-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add packages' static components from templates #555
chore: add packages' static components from templates #555
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
2eba6e6
to
20b41ae
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I think the static files and copying them over into code generated clients should happen in the Java codegen. |
@mtdowling moved static files generation to the code gen. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
...va/software/amazon/smithy/aws/typescript/codegen/AwsPackageFixturesGeneratorIntegration.java
Show resolved
Hide resolved
) { | ||
writerFactory.accept(".gitignore", writer -> { | ||
String resource = IoUtils.readUtf8Resource( | ||
getClass().getClassLoader(), "software/amazon/smithy/aws/typescript/codegen/gitignore"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to just say "gitignore" and leave out the rest of the path
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration; | ||
import software.amazon.smithy.utils.IoUtils; | ||
|
||
public class AwsPackageFixturesGeneratorIntegration implements TypeScriptIntegration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: make this final
}); | ||
writerFactory.accept("README.md", writer -> { | ||
String resource = IoUtils.readUtf8Resource(getClass(), "README.md.template"); | ||
resource = resource.replaceAll("\\$\\{packageName\\}", settings.getPackageName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: "\\$\\{packageName\\}"
could be replaced with Pattern.quote("${packageName}")
to make it more readable.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
import software.amazon.smithy.model.node.Node; | ||
import software.amazon.smithy.typescript.codegen.TypeScriptCodegenPlugin; | ||
|
||
public class AwsPackageFixturesGeneratorIntegrationTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
6f2a57b
to
0417fa9
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Generate
LICENSE
,.gitignore
,.npmignore
,tsconfig.*.json
,READEME.md
in the AWS client codegen. Once generated for the first time, these files would be overwritten by codegen again. These entities will be maintained in-place instead of codegen.Related: smithy-lang/smithy-typescript#56
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.